
export function toggleFullscreen() {
  const doc: any = document;
  const isFull = !!(doc.fullscreenElement || doc.webkitFullscreenElement || doc.mozFullScreenElement);
  if (!isFull) {
    const el: any = document.documentElement;
    (el.requestFullscreen || el.webkitRequestFullScreen || el.mozRequestFullScreen)?.call(el);
  } else {
    (doc.exitFullscreen || doc.webkitCancelFullScreen || doc.mozCancelFullScreen)?.call(doc);
  }
}
